package control;



import java.util.HashMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import model.LoginService;

import org.json.JSONObject;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

public class LoginController extends MultiActionController{
	private LoginService loginService;
	public LoginController(LoginService loginService){
		this.loginService=loginService;
	}
	public ModelAndView login(HttpServletRequest request,HttpServletResponse response) throws Exception{
		
		String id=request.getParameter("id");
		String pass=request.getParameter("pass");
		System.out.println("svn commit test");
		System.out.println(loginService.login(id, pass));
		return new ModelAndView("JsonView",loginService.login(id, pass));
	}
}
